package com.linkhub.oms.admin.modules.system.domain.param;

import cn.hutool.core.lang.RegexPool;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @Description: EmailCodeParam
 * @Author: echo
 * @Date: 2024/3/6 14:51
 * @Version: 1.0
 */
@Data
@ApiModel("EmailCodeParam")
public class EmailCodeParam implements Serializable {

    @ApiModelProperty("邮箱")
    @Pattern(regexp = RegexPool.EMAIL, message = "{validation.email.pattern}")
    private String email;

    @ApiModelProperty("业务来源：1-注册; 2-重置密码")
    @Range(min = 1, max = 2, message = "{validation.email.source}")
    @NotNull(message = "{validation.email.source}")
    private Integer source;
}
